package movie.entity;


import java.sql.Time;
//import java.sql.Date;
//import java.sql.Time;
import java.sql.Timestamp;
import java.text.SimpleDateFormat;
import java.util.Date;

import org.springframework.format.annotation.DateTimeFormat;



public class Film {
	private int movieId;
	private String filmName;
	private String director;
	private String cover;
	private String type;
	private String leads;
	private String country;
	
	
	//@DateTimeFormat(pattern = "hh:mm")
	private Integer  filmLength;
	@DateTimeFormat(pattern = "yyyy-MM-dd")
	private Date releaseDate;
	private float score;
	private String introduction;

	private Integer reying;

	private int wantsee;
	private float piaofang;
	private int scoreNumber;
	

	
	private String releaseDateString;	
	private String filmLengthString;
	
	
	public int getScoreNumber() {
		return scoreNumber;
	}
	public void setScoreNumber(int scoreNumber) {
		this.scoreNumber = scoreNumber;
	}
	public int getintpf() {
		return (int)piaofang;
	}
	public int getWantsee() {
		return wantsee;
	}
	public void setWantsee(int wantsee) {
		this.wantsee = wantsee;
	}
	public float getPiaofang() {
		return piaofang;
	}
	public void setPiaofang(float piaofang) {
		this.piaofang = piaofang;
	}
	public String getFilmName() {
		return filmName;
	}
	public void setFilmName(String filmName) {
		this.filmName = filmName;
	}
	public String getDirector() {
		return director;
	}
	public void setDirector(String director) {
		this.director = director;
	}
	public int getZheng() {
		return (int)score;
	}
	public int getXiao() {
		return (int)(10.0 * (score - (int)score));
	}
	public String getCover() {
		return cover;
	}
	public void setCover(String cover) {
		this.cover = cover;
	}
	public String getType() {
		return type;
	}
	public void setType(String type) {
		this.type = type;
	}
	public String getLeads() {
		return leads;
	}
	public void setLeads(String leads) {
		this.leads = leads;
	}
	public String getCountry() {
		return country;
	}
	public void setCountry(String country) {
		this.country = country;
	}
	public Integer getFilmLength() {
		return filmLength;
	}
	public void setFilmLength(Integer filmLength) {
		this.filmLength = filmLength;
	}
	public Date getReleaseDate() {
		return releaseDate;
	}
	public void setReleaseDate(Date releaseDate) {
		this.releaseDate = releaseDate;
	}
	public float getScore() {
		return score;
	}
	public void setScore(float score) {
		this.score = score;
	}
	public String getIntroduction() {
		return introduction;
	}
	public void setIntroduction(String introduction) {
		this.introduction = introduction;
	}
	public String getReleaseDateString() {
		return releaseDateString;
	}
	public String getDate() {
		SimpleDateFormat format1 = new SimpleDateFormat("yyyy-MM-dd");		
		String r = format1.format(releaseDate);
		return r;
	}
	public void setReleaseDateString(String releaseDateString) {
		this.releaseDateString = releaseDateString;
	}
	public int getMovieId() {
		return movieId;
	}
	public void setMovieId(int movieId) {
		this.movieId = movieId;
	}
	public String getFilmLengthString() {
		return filmLengthString;
	}
	public void setFilmLengthString(String filmLengthString) {
		this.filmLengthString = filmLengthString;
	}
	
	public Integer getReying() {
		return reying;
	}
	public void setReying(Integer reying) {
		this.reying = reying;
	}
	@Override
	public String toString() {
		return "Film [movieId=" + movieId + ", filmName=" + filmName + ", director=" + director + ", cover=" + cover
				+ ", type=" + type + ", leads=" + leads + ", country=" + country + ", filmLength=" + filmLength
				+ ", releaseDate=" + releaseDate + ", score=" + score + ", introduction=" + introduction
				+ ", releaseDateString=" + releaseDateString + ", filmLengthString=" + filmLengthString + "]";
	}

}

